package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.*;
import com.acme.bankapp.domain.bank.Client.Gender;

public class BankService {
	public void addClient(Bank bank, int num, String name, Gender Gender,
			double initial) {
		bank.clients[num] = new Client(name, Gender, new SavingAccount(initial));
	}

	public void addClient(Bank bank, int num, String name, Gender gender,
			double initial, double overdraft) {
		bank.clients[num] = new Client(name, gender, new CheckingAccount(
				initial, overdraft));
	}

	public void printMaximumAmountToWithdraw(Bank bank, int clientCount) {
		for (int i = 0; i < clientCount; i++) {
			Account MaximumAmountToWithdraw = bank.clients[i].getAccount();
			bank.clients[i].getClientSolutation();
			MaximumAmountToWithdraw.getBalance(); // polymorphism
		}
	}
}
